/*
    Copyright (C) 2010, Felix Bytow <drako123@gmx.de>

    This file is part of DBCpp.

    DBCpp is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
    the Free Software Foundation, either version 3 of the License, or
    (at your option) any later version.

    DBCpp is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    GNU General Public License for more details.

    You should have received a copy of the GNU General Public License
    along with DBCpp.  If not, see <http://www.gnu.org/licenses/>.
*/

#include <iostream>
#include <DBCpp.hpp>

using namespace DBCpp;
using namespace std;

int main(int argc, char** argv)
{
	// like you see it is really simple to load a specific DBC
	AreaTableDBC dbc;
	dbc.loadFromFile("./AreaTable.dbc");

	// this way you can access the values
	// a specific record may also be accessed through dbc[index]
	for (AreaTableDBC::iterator it = dbc.begin(); it != dbc.end(); ++it)
	{
		std::cout << "Zone ID:    " << it->ID << std::endl;
		std::cout << "Map ID:     " << it->MapID << std::endl;
		std::cout << "Area ID:    " << it->AreaID << std::endl;
		std::cout << "Area Level: " << it->AreaLevel << std::endl;
		std::cout << "Area Name:  " << dbc.getLocalString(it->AreaName) << std::endl;
		std::cout << std::endl;
	}
	return 0;
}
